from decimal import Decimal


class Building:
    def __init__(self, length: float, width: float, floor_count: int, unit_price: Decimal):
        self._length = length
        self._width = width
        self._floor_count = floor_count
        self._unit_price = unit_price

    @property
    def length(self):
        return self._length

    @property
    def width(self):
        return self._width

    @property
    def floor_count(self):
        return self._floor_count

    @property
    def unit_price(self):
        return self._unit_price

    @property
    def floor_area(self):
        return self._length * self._width

    @property
    def total_area(self):
        return self.floor_area * self._floor_count

    @property
    def price(self):
        return Decimal(self.total_area) * self.unit_price


def _main():
    length = float(input("请输入楼房长："))
    width = float(input("请输入楼房宽："))
    count = int(input("请输入楼房层数："))
    price = Decimal(input("请输入单价："))
    building = Building(length, width, count, price)
    print(f"总面积：{building.total_area:.2f} 总价：{building.price:.2f}")


if __name__ == "__main__":
    _main()
